<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AIfES 2: aicore_optitype Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="AIfES_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AIfES 2
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('structaicore__optitype.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">aicore_optitype Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Type indicator of the optimizer to check for the optimizer type.  
 <a href="structaicore__optitype.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="aifes__core_8h_source.html">aifes_core.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:a8f8f80d37794cde9472343e4487ba3eb"><td class="memItemLeft" align="right" valign="top"><a id="a8f8f80d37794cde9472343e4487ba3eb"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structaicore__optitype.html#a8f8f80d37794cde9472343e4487ba3eb">name</a></td></tr>
<tr class="memdesc:a8f8f80d37794cde9472343e4487ba3eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Name of the optimizer type (for example "ADAM") <br /></td></tr>
<tr class="separator:a8f8f80d37794cde9472343e4487ba3eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c47b929d158f7ef286d7faef130e018"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structaicore__optitype.html#a6c47b929d158f7ef286d7faef130e018">print_specs</a> )(const <a class="el" href="structaiopti.html">aiopti_t</a> *self)</td></tr>
<tr class="memdesc:a6c47b929d158f7ef286d7faef130e018"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a function to print specs of the optimizer.  <a href="structaicore__optitype.html#a6c47b929d158f7ef286d7faef130e018">More...</a><br /></td></tr>
<tr class="separator:a6c47b929d158f7ef286d7faef130e018"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Type indicator of the optimizer to check for the optimizer type. </p>
<p>Every optimizer should have a constant global variable of this type which indicates the optimizer type.<br  />
Example for the adam optimizer:<br  />
 </p><div class="fragment"><div class="line"><span class="keyword">const</span> <a class="code" href="structaicore__optitype.html">aicore_optitype_t</a> aiopti_adam_type_s = {</div>
<div class="line"><span class="preprocessor">#ifdef AIDEBUG_PRINT_MODULE_SPECS</span></div>
<div class="line">    .<a class="code" href="structaicore__optitype.html#a8f8f80d37794cde9472343e4487ba3eb">name</a> = <span class="stringliteral">&quot;ADAM&quot;</span>,</div>
<div class="line">    .print_specs = <a class="code" href="aiopti__adam_8h.html#a916f8f38aaeba5814db961c3ff00a3d4">aiopti_adam_print_specs</a></div>
<div class="line"><span class="preprocessor">#else</span></div>
<div class="line">    .name = 0,</div>
<div class="line">    .print_specs = 0</div>
<div class="line"><span class="preprocessor">#endif</span></div>
<div class="line">};</div>
<div class="line"><span class="keyword">const</span> <a class="code" href="structaicore__optitype.html">aicore_optitype_t</a> *<a class="code" href="aiopti__adam_8h.html#af4b770ca8b7c46a865a01dedd0c866af">aiopti_adam_type</a> = &amp;aiopti_adam_type_s;</div>
<div class="ttc" id="aaiopti__adam_8h_html_a916f8f38aaeba5814db961c3ff00a3d4"><div class="ttname"><a href="aiopti__adam_8h.html#a916f8f38aaeba5814db961c3ff00a3d4">aiopti_adam_print_specs</a></div><div class="ttdeci">void aiopti_adam_print_specs(const aiopti_t *self)</div><div class="ttdoc">Print the optimizer specification.</div></div>
<div class="ttc" id="aaiopti__adam_8h_html_af4b770ca8b7c46a865a01dedd0c866af"><div class="ttname"><a href="aiopti__adam_8h.html#af4b770ca8b7c46a865a01dedd0c866af">aiopti_adam_type</a></div><div class="ttdeci">const aicore_optitype_t * aiopti_adam_type</div><div class="ttdoc">Adam optimizer type.</div></div>
<div class="ttc" id="astructaicore__optitype_html"><div class="ttname"><a href="structaicore__optitype.html">aicore_optitype</a></div><div class="ttdoc">Type indicator of the optimizer to check for the optimizer type.</div><div class="ttdef"><b>Definition:</b> aifes_core.h:160</div></div>
<div class="ttc" id="astructaicore__optitype_html_a8f8f80d37794cde9472343e4487ba3eb"><div class="ttname"><a href="structaicore__optitype.html#a8f8f80d37794cde9472343e4487ba3eb">aicore_optitype::name</a></div><div class="ttdeci">const char * name</div><div class="ttdoc">Name of the optimizer type (for example &quot;ADAM&quot;)</div><div class="ttdef"><b>Definition:</b> aifes_core.h:161</div></div>
</div><!-- fragment --><p>Checks for the optimizer type can look like this:<br  />
</p><div class="fragment"><div class="line"><a class="code" href="structaiopti.html">aiopti_t</a> *example_optimizer;</div>
<div class="line"><span class="keywordflow">if</span>(example_optimizer-&gt;<a class="code" href="structaiopti.html#a6ca0fdd2169bc462e1cc4f87e786933d">optimizer_type</a> == <a class="code" href="aiopti__adam_8h.html#af4b770ca8b7c46a865a01dedd0c866af">aiopti_adam_type</a>){</div>
<div class="line">  ...</div>
<div class="line">}</div>
<div class="ttc" id="astructaiopti_html"><div class="ttname"><a href="structaiopti.html">aiopti</a></div><div class="ttdoc">AIfES optimizer interface.</div><div class="ttdef"><b>Definition:</b> aifes_core.h:438</div></div>
<div class="ttc" id="astructaiopti_html_a6ca0fdd2169bc462e1cc4f87e786933d"><div class="ttname"><a href="structaiopti.html#a6ca0fdd2169bc462e1cc4f87e786933d">aiopti::optimizer_type</a></div><div class="ttdeci">const aicore_optitype_t * optimizer_type</div><div class="ttdoc">Type of the optimizer (for example aiopti_sgd_type)</div><div class="ttdef"><b>Definition:</b> aifes_core.h:439</div></div>
</div><!-- fragment --> </div><h2 class="groupheader">Field Documentation</h2>
<a id="a6c47b929d158f7ef286d7faef130e018"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c47b929d158f7ef286d7faef130e018">&#9670;&nbsp;</a></span>print_specs</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* print_specs) (const <a class="el" href="structaiopti.html">aiopti_t</a> *self)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set a function to print specs of the optimizer. </p>
<p>This function should only be set in the debug mode when prints are required (to save memory otherwise)</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>The optimizer </td></tr>
    <tr><td class="paramname">*print</td><td>A function for printing (for example printf) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="aifes__core_8h_source.html">aifes_core.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="structaicore__optitype.html">aicore_optitype</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
